package common.kit;

import com.jfinal.kit.Kv;

public class KvCond extends Kv{

	public KvCond() {
		
	}
	
	public static KvCond byEqual( String key , Object value ) {
		return new KvCond().setEqual(key , value);
	}

	public static KvCond byNotLessThan( String key , Object value ) {
		return new KvCond().setNotLessThan(key , value);
	}
	
	public KvCond setEqual(String key, Object value) {
		return set(key + " = ", value);
	}

	public KvCond setNotEqual(String key, Object value) {
		return set(key + " != ", value);
	}

	public KvCond setNotLessThan( String key, Object value ) {
		return set(key + " >= ", value);
	}
	
	public KvCond set(Object key, Object value) {
		super.set(key, value);
		return this;
	}
}
